package com.hedl.practice.diyJava.reflex.study_01.tmp;

public class Employee extends Person{

    public static Integer totalNum = 0;     //员工数
    public int empNo;       //员工编号
    protected String position;      //职位
    private int salary;     //工资

    public void sayHello(){
        System.out.println(String.format("Hello,我是%s，今年%s岁,爱好是%s,我目前的工作是%s,月入%s元\n",name,age,getHobby(),position,salary));
    }

    private void work(){
        System.out.println(String.format("My name is %s, 工作中勿扰.", name));
    }

    public Employee(String name,String age,String hobby,int empNo,String position,int salary){
        super(name,age,hobby);
        this.empNo = empNo;
        this.position = position;
        this.salary = salary;
        Employee.totalNum++;
    }
}
